package com.learn.controller;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2025/02/06
 * @description
 */
@ControllerAdvice
public class exController {
    @ExceptionHandler(Exception.class)
    public String errors(Exception e, Model model) {
        model.addAttribute("ex", e);
        return "errors";
    }
}
